package com.ccrfid.rmc6.repository.sys;

import com.ccrfid.rmc6.entity.sys.AccountEntity;
import org.springframework.data.repository.Repository;

import java.util.List;

public interface AccountRepository extends Repository<AccountEntity, Long> {
    //
    AccountEntity getById(Long id);
    //
    AccountEntity getByUserAccount(String userAccount);
    //
    Boolean existsById(Long id);
    Boolean existsByUserAccount(String userAccount);
    Boolean existsByUserAccountAndAndIdNot(String userAccount, Long id);
    //
    AccountEntity save(AccountEntity entity);
    //
    void deleteById(Long id);
    //
    List<AccountEntity> getAllByPersonnelId(Long personnelId);
}
